home *** CD-ROM | disk | FTP | other *** search
/ Space & Astronomy / Space and Astronomy (October 1993).iso / pc / viewers / msdos / pixit.arc / PIX320.ASM < prev    next >
Assembly Source File  |  1989-04-14  |  2KB  |  72 lines

  1.  
  2. comment #
  3.  
  4. pix320.com displays the image that follows the code in the VGA 320x200
  5. by 256 color mode.  The image is made using gifdcd from an appropriate
  6. .gif file.  For example, this will make porsche.com from porsche.gif
  7. assuming porsche.gif is a 320x200 .gif image:
  8.  
  9.         C>gifdcd/w porsche
  10.         porsche is 320x200x5 bits and 4 bits/color with a global color map
  11.          background color is 0
  12.          image: start 0/0 pixels from left/top, is 320x200 sequential
  13.           code size = 5 bits
  14.           decompressed image = 64000 pixels
  15.          file properly terminated (but extra data at end)
  16.  
  17.         C>copy pix320.com/b+porsche.pix/b porsche.com
  18.  
  19. #
  20.  
  21. pix320 segment
  22.  assume cs:pix320,ds:pix320,es:pix320,ss:pix320
  23.   org 100h
  24. start:
  25.   mov sp,100h
  26.         ; select 320x200x8 VGA mode.
  27.   mov ax,13h
  28.   int 10h
  29.         ; write 256 color palette.
  30.   mov ax,1012h
  31.   mov bx,0
  32.   mov cx,256
  33.   mov dx,offset image+16
  34.   int 10h
  35.         ; turn off screen.
  36.   mov dx,03c4h
  37.   mov al,1
  38.   out dx,al
  39.   inc dx
  40.   in al,dx
  41.   or al,020h
  42.   out dx,al
  43.         ; copy image to screen.
  44.   cld
  45.   mov si,offset image+16+768
  46.   sub di,di
  47.   mov ax,0a000h
  48.   mov es,ax
  49.   assume es:nothing
  50.   mov cx,32000
  51.   rep movsw
  52.         ; turn on screen.
  53.   mov dx,03c4h
  54.   mov al,1
  55.   out dx,al
  56.   inc dx
  57.   in al,dx
  58.   and al,0dfh
  59.   out dx,al
  60.         ; wait for keystroke.
  61.   mov ah,0
  62.   int 16h
  63.         ; restore screen and return.
  64.   mov ax,3
  65.   int 10h
  66.   int 20h
  67.         ; image starts at even byte after code.
  68.   even
  69. image label byte
  70. pix320 ends
  71. end start
  72.